import Vue from 'vue'
import VueRouter from 'vue-router'


import Layout from '@/layout'

Vue.use(VueRouter)

const routes = [{
        path: '*',
        redirect: '/'
    },
    {
        path: '/',
        component: Layout,
        redirect: '/index',
        children: [{
            path: 'index',
            component: () => import('@/views/ScreenHome.vue'),
            name: 'Dashboard',
        }]
    },
    {
        path: '/admin',
        component: () => import('@/views/editScreen/editScreen.vue'),
    }
]

const router = new VueRouter({
    routes
})

export default router